home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / VBASIC / VBDLH02.ZIP / VBDE_SRC.ZIP / VBDETIP.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-03-08  |  2.4 KB  |  67 lines

  1. VERSION 2.00
  2. Begin Form frmToolTips 
  3.    BorderStyle     =   1  'Fixed Single
  4.    ClientHeight    =   900
  5.    ClientLeft      =   1080
  6.    ClientTop       =   1650
  7.    ClientWidth     =   1725
  8.    ControlBox      =   0   'False
  9.    FontBold        =   0   'False
  10.    FontItalic      =   0   'False
  11.    FontName        =   "
  12.    FontSize        =   10.5
  13.    FontStrikethru  =   0   'False
  14.    FontUnderline   =   0   'False
  15.    Height          =   1275
  16.    Left            =   1035
  17.    LinkTopic       =   "Form1"
  18.    MaxButton       =   0   'False
  19.    MinButton       =   0   'False
  20.    ScaleHeight     =   900
  21.    ScaleWidth      =   1725
  22.    Top             =   1320
  23.    Width           =   1815
  24.    Begin Timer tmrCounter 
  25.       Left            =   1080
  26.       Top             =   120
  27.    End
  28. '===================================================
  29. 'Sample VB program using UNLHA.DLL
  30. 'VBDeTip.Frm    (frmToolTips)
  31. 'Original: Niiyama(HEROPA) SGV00153@niftyserve.or.jp
  32. 'English : Hitoshi Ozawa   h_ozawa@bekkoame.or.jp
  33. '===================================================
  34. Option Explicit
  35. Dim intTimerCounter As Integer                      'Timer Counter
  36. Sub Form_Load ()
  37.     tmrCounter.Interval = 500   'just about right?
  38.     intTimerCounter = 0
  39.     Me.BackColor = glngColorWINDOW  '&H80000005
  40. End Sub
  41. Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
  42.     gintTiphWnd = 0 'tipIndex = -1
  43.     gintParenthWnd = -1
  44. End Sub
  45. Sub tmrCounter_Timer ()
  46.     Dim intReturnCode As Integer, pRect As tagRECT, pPoint As tagPoint
  47.     If intTimerCounter = 1 Then
  48.         If GetActiveWindow() <> gintParenthWnd% Then
  49.         'Stop main form from becoming active, when help menu is checked
  50.         'and tool button's MouseMove event is detected.
  51.             Unload Me
  52.             Exit Sub
  53.         End If
  54.         intReturnCode% = ShowWindow(Me.hWnd, SW_SHOWNA)
  55.         intReturnCode% = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOMOVE Or SWP_NOSIZE)
  56.         intTimerCounter% = intTimerCounter% + 1
  57.         Exit Sub
  58.     End If
  59.     intTimerCounter% = intTimerCounter% + 1
  60.     If intTimerCounter% > 3 Then intTimerCounter% = 2
  61.     GetWindowRect gintTiphWnd, pRect
  62.     GetCursorPos pPoint
  63.     If pPoint.x < pRect.Left Or pPoint.x > pRect.Right Or pPoint.y < pRect.Top Or pPoint.y > pRect.Bottom Then
  64.         Unload Me
  65.     End If
  66. End Sub
  67.